package com.xbongbong.pro.statistic.pojo;

import com.xbongbong.i18n.util.I18nMessageUtil;
import com.xbongbong.pro.statistic.ChartDrillItemPojo;
import com.xbongbong.pro.statistic.constant.ChartI18Constant;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.List;

/**
 * @author zcp
 * @version v1.0
 * @since v1.0
 */
@Getter
@Setter
@ToString
@NoArgsConstructor
public class ChartDrillListPojo implements Serializable {
    private static final long serialVersionUID = -9009249229859296094L;
    /**
     * title，固定为“层级结构”
     */
    private String title;
    /**
     * 层级id
     */
    private Long id;

    /**
     * 各个钻取层级数据，对应数据库表 tb_chart_drill 内字段 drill 的值
     */
    private List<ChartDrillItemPojo> list;

    public ChartDrillListPojo(List<ChartDrillItemPojo> list){
        //顶级标题固定为“层级结构”
        this.title = I18nMessageUtil.getMessage(ChartI18Constant.CHART_DRILL_TITLE);
        this.list = list;
    }
}
